<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="utf-8" />
    <title>编辑文章页面</title>
    <%- include('./BG_layouts/header.ejs')%>
  </head>

  <body>
    <script>
      NProgress.start();
    </script>

    <div class="main">
      <%- include('./BG_layouts/navbar.ejs') %>
      <div class="container-fluid">
        <div class="page-title">
          <h1>写文章</h1>
        </div>
        <!-- 有错误信息时展示 -->
        <!-- <div class="alert alert-danger">
        <strong>错误！</strong>发生XXX错误
      </div> -->
        <form class="row form-add">
          <div class="col-md-9">
            <div class="form-group">
              <!-- 文本编辑器 -->
              <iframe
                width="100%"
                height="800px"
                name="wbbjq"
                src="/bjq.html"
                frameborder="0"
              ></iframe>
            </div>
          </div>
          <div class="col-md-3">
            <div class="form-group">
              <label for="slug">文章标题</label>
              <input
                id="slug"
                class="form-control"
                name="slug"
                type="text"
                placeholder="文章标题"
              />
            </div>
            <div class="form-group">
              <label for="author">文章作者</label>
              <input
                id="author"
                class="form-control"
                name="author"
                type="text"
                placeholder="文章作者"
              />
            </div>
            <div class="form-group">
              <label for="category">文章类型,所属分类</label>
              <select id="category" class="form-control" name="category">
                <%list.forEach(function(ele,index){%>
                <option value="<%= ele.id%>"><%=ele.option%></option>
                <%})%>
              </select>
            </div>
            <div class="form-group">
              <label for="created">发布时间</label>
              <input
                id="created"
                class="form-control"
                name="created"
                type="datetime-local"
              />
            </div>
            <div class="form-group">
              <label for="status">状态</label>
              <select id="status" class="form-control" name="status">
                <option value="drafted">草稿</option>
                <option value="published">已发布</option>
              </select>
            </div>
            <div class="form-group">
              <button class="btn btn-primary btn-add" type="button">
                保存
              </button>
            </div>
          </div>
        </form>
      </div>
    </div>

    <%- include('./BG_layouts/aside.ejs') %> <%-
    include('./BG_layouts/footer.ejs') %>

    <script src="/background/js/postAdd.js"></script>
  </body>
</html>
